﻿<%@ Page Language="C#" MasterPageFile="~/TrangChu.Master" AutoEventWireup="true"
    CodeBehind="Baithi.aspx.cs" Inherits="DOAN.Baithi" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <script language="javascript" type="text/javascript">
        // Created by: Neill Broderick :: http://www.bespoke-software-solutions.co.uk/downloads/downjs.php

        var mins
        var secs;
        var dem;
        function cd() {
            mins = 1 * m("90"); // change minutes here
            secs = 0 + s(":01"); // change seconds here (always add an additional second to your total)
            redo();
        }

        function m(obj) {
            for (var i = 0; i < obj.length; i++) {
                if (obj.substring(i, i + 1) == ":")
                    break;
            }
            return (obj.substring(0, i));
        }

        function s(obj) {
            for (var i = 0; i < obj.length; i++) {
                if (obj.substring(i, i + 1) == ":")
                    break;
            }
            return (obj.substring(i + 1, obj.length));
        }

        function dis(mins, secs) {
            var disp;
            if (mins <= 89) {
                disp = " ";
            } else {
                disp = " ";
            }
            disp += mins + ":";
            if (secs <= 89) {
                disp += secs;
            } else {
                disp += secs;
            }
            return (disp);
        }

        function redo() {
          
              secs--;
            if (secs == -1) {
                secs = 59;
                mins--;
            }
            document.cd.disp.value = dis(mins, secs); // setup additional displays here.
            if ((mins == 0) && (secs == 0)) {
                window.alert("Hết thời gian"); // change timeout message as required
                // window.location = "yourpage.htm" // redirects to specified page once timer ends and ok button is pressed
            } else {
                cd = setTimeout("redo()", 1000);
            }
        }

        function init() {
            cd();

        }
        window.onload = init;
        function stop() {

           
        }
       
       
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="content-right">
        <div class="register">
            <asp:Label ID="lblLoi" runat="server" Text=""> </asp:Label>
        </div>
        <div class="register">
            <asp:Label ID="Label2" runat="server" Text="Chon Mon"> </asp:Label>
            <asp:DropDownList ID="drpMon" runat="server"></asp:DropDownList><br />
            <asp:Label ID="Label3" runat="server" Text="Nhap Ma DT"> </asp:Label>
            <asp:TextBox ID="txtma" runat="server"></asp:TextBox><br />
            <asp:Button ID="btbegin" runat="server" Text="BatDau" onclick="btbegin_Click" />
        </div>
        
        <asp:Panel ID="pnTT" Visible="false" runat="server" >
        <div class="register">
            <%-- <asp:Label runat="server" ID="lblkequa" Text="Ket qua"></asp:Label>--%>
            <span class="font_time fs20 fb cl3">
                <asp:Label runat="server" ID="lblttkequa"> Thông tin thí sinh và đề thi</asp:Label></span><br />
            <div class="text_box2">
                <span class="fb">Họ tên: </span>
                <asp:Label ID="lblTT_hoten" runat="server" Text=""> </asp:Label>
            </div>
            <div class="text_box2">
                <asp:Label ID="lbTG" runat="server"> Phut</asp:Label>
            </div>
            <div class="text_box2">
                <span class="marl10 fb">Số câu đúng: </span>
                <asp:Label ID="lblTT_Socaudung" runat="server" Text=""> </asp:Label>
            </div>
            <br />
            <div class="register">
                <div class="text_box2">
                    <span class="fb">Môn thi: </span>
                    <asp:Label ID="lblTT_monthi" runat="server" Text=""> </asp:Label>
                </div>
                <div class="text_box2">
                    <span class="marl10 fb">Thời gian còn lại:
                        <input id="Text" type="text" style="border-style: none; border-color: inherit; border-width: 0px;
                            width: 58px;" value="90:00" name="disp" /></span>
                </div>
                <div>
                    <span class="marl10 fb">Số điểm đạt được: </span>
                    <asp:Label ID="lblTT_Sodiem" runat="server" Text=""></asp:Label>
                </div>
            </div>
        </div>
        </asp:Panel>
        <div class="register mart22">
            <asp:LinkButton ID="btXemdapan" Visible="false" runat="server" Text=" Xem đáp án" /></div>
        <asp:Panel ID="pnthi" runat="server">
            <div class="register mart22">
                <asp:DataList ID="dtCauhoi" runat="server" Style="margin-right: 448px" Width="436px">
                    <EditItemStyle BackColor="#FF3399" BorderColor="#CC3399" BorderStyle="Dotted" BorderWidth="1px" />
                    <ItemTemplate>
                        <span class="fb fs16">
                            <asp:Label ID="Label1" runat="server">Câu <%#Eval("STT") %> <%# Container.ItemIndex+1 %> </asp:Label></span> <span class="fb fs16">
                                <asp:Label ID="lblsocau" runat="server" Text=" "></asp:Label></span><br />
                        <asp:Image ImageUrl='<%#Eval("Image") %>' runat="server" Width="100px" Height="100px" /><br />
                        <%--<asp:Label runat="server" ID="lblCauhoi"><span class="mart22"><a href='<%#"Luyenthi.aspx?id=Made" + Eval("Macauhoi") %>'></a> <%#Eval("Noidung")%></span></asp:Label><br />--%>
                        <asp:Label Text='<%#Eval("Noidung") %>' runat="server"></asp:Label><br />
                        <span class="marl10">
                            <asp:RadioButton ID="Rd1" runat="server" Checked="true" GroupName="TL" AutoPostBack="false" Text='<%#DataBinder.Eval(Container.DataItem,"DapanA") %>' />
                        </span>
                        <br />
                        <span class="marl10">
                            <asp:RadioButton ID="Rd2" runat="server" GroupName="TL" AutoPostBack="false" Text='<%#DataBinder.Eval(Container.DataItem,"DapanB") %>' />
                        </span>
                        <br />
                        <span class="marl10">
                            <asp:RadioButton ID="Rd3" runat="server" GroupName="TL" AutoPostBack="false" Text='<%#DataBinder.Eval(Container.DataItem,"DapanC") %>' />
                        </span>
                        <br />
                        <span class="marl10">
                            <asp:RadioButton ID="Rd4" runat="server" GroupName="TL" AutoPostBack="false" Text='<%#DataBinder.Eval(Container.DataItem,"DapanD") %>' />
                        </span>
                        <br />
                        <span class="marl10 cl4">
                            <asp:Label runat="server" ID="lbltrue" Visible="false" Text='<%#DataBinder.Eval(Container.DataItem,"Phuongandung") %>'></asp:Label>
                        </span>
                        <br />
                    </ItemTemplate>
                </asp:DataList>
            </div>
            <div class="register mart10">
                <asp:Button ID="btNopbai" Visible="false" runat="server" Text="Nộp bài" OnClick="btoke_Click" OnClientClick="stop()" />
            </div>
        </asp:Panel>
        
    </div>
</asp:Content>
